Skip to content

Parse Snowflake COLLATE after double-colon casts - #20

Merged
osipovartem merged 1 commit into
embucket-sync-df55.0.0from
snowflake-quoted-collation
Sep 5, 2026
Merged

Parse Snowflake COLLATE after double-colon casts#20
osipovartem merged 1 commit into
embucket-sync-df55.0.0from
snowflake-quoted-collation

Conversation

@osipovartem

Copy link
Copy Markdown

Summary

  • parse Snowflake postfix COLLATE when it follows a :: cast
  • preserve the existing Expr::Collate AST representation
  • keep behavior unchanged for other dialects

Motivation

Snowflake accepts expressions such as 'ñ'::VARCHAR COLLATE 'es'. The parser previously consumed the double-colon cast as an infix expression and then left COLLATE unparsed. Rustice needs this syntax for Snowflake collation compatibility.

Validation

  • cargo +1.97.0 test --test sqlparser_snowflake (162 passed)
  • cargo +1.89.0 clippy --all-targets --all-features -- -D warnings
  • cargo +1.97.0 fmt --all -- --check

@osipovartem
osipovartem merged commit d6fbc21 into embucket-sync-df55.0.0 Sep 5, 2026
19 checks passed
@osipovartem
osipovartem deleted the snowflake-quoted-collation branch September 5, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant